package ywpt.service.system;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import ywpt.components.acegi.domain.Resource;
 
public interface ResourceService {
	public abstract Resource getResourceById(Long id);

	public abstract List<Resource> getResources();

	public abstract List<Resource> getResourcesByCriteria(DetachedCriteria query);
	
	public abstract List<Resource> getResourcesByCriteria(DetachedCriteria query,int pageSize,int startIndex);
	
	public abstract List<Resource> getResourcesByRole(String roleId);
	
	public abstract void saveResource(Resource role);

	public abstract  void updateResource(Resource resource);
	
	public abstract void removeResource(String id);
	
	public abstract int[] removeResources(Long[] ids);

	public abstract int getResCountByCriteria(DetachedCriteria query);
 
	public abstract List getFunctionResTree();	
}